
CPP = @g++
DEL = @rm
ECHO = @echo
SRCS += *.cpp

MAKE_PATH = $(abspath $(lastword $(MAKEFILE_LIST)))
CURRENT_DIR = $(notdir $(patsubst %/,%,$(dir $(MAKE_PATH))))

OUT_EXE = $(CURRENT_DIR)

build: $(SRCS)
	$(ECHO) Building...
	$(CPP) -o $(OUT_EXE) $(SRCS)
	$(ECHO) $(OUT_EXE) is completed

clean:
	$(ECHO) Cleaning...
	$(DEL) -f *.o
	$(DEL) -f $(OUT_EXE)

rebuild: clean build

